import java.util.Scanner;

public class StudentGrades {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // 定义常量
        final int STUDENT_COUNT = 5;

        // 存储学号和成绩的数组
        String[] studentIDs = new String[STUDENT_COUNT];
        double[][] scores = new double[STUDENT_COUNT][2];

        // 输入学生学号和成绩
        for (int i = 0; i < STUDENT_COUNT; i++) {
            System.out.print("请输入第 " + (i + 1) + " 个学生的学号: ");
            studentIDs[i] = scanner.nextLine();

            System.out.print("请输入第 " + (i + 1) + " 个学生的第一门课程成绩: ");
            scores[i][0] = scanner.nextDouble();

            System.out.print("请输入第 " + (i + 1) + " 个学生的第二门课程成绩: ");
            scores[i][1] = scanner.nextDouble();

            // 清空输入缓冲区
            scanner.nextLine(); // 读取换行符
        }

        // 输出结果
        System.out.println("\n学号\t\t第一门成绩\t第二门成绩\t平均成绩");
        for (int i = 0; i < STUDENT_COUNT; i++) {
            double average = (scores[i][0] + scores[i][1]) / 2;
            System.out.printf("%s\t\t%.2f\t\t%.2f\t\t%.2f\n", studentIDs[i], scores[i][0], scores[i][1], average);
        }

        scanner.close();
    }
}